<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta name="Content-Type" content="text/html; charset=UTF-8" />
<title>Class: Reflection::Config</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '..';
  if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>

  </head>
  <body>
    <div id="header">
      <div id="menu">
  
    <a href="../_index.html">Index (C)</a> &raquo; 
    <a title="Reflection" href="../Reflection.html">Reflection</a>
     &raquo; 
    <span class="title">Config</span>
  
</div>

      <div id="search">
  <a id="class_list_link" href="#">Namespace List</a>
  <a id="method_list_link" href="#">Method List</a>
  <a id ="file_list_link" href="#">File List</a>
</div>

      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Class: Reflection::Config 
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">Object</span>
      
      </dd>
    
  
  
    
  
    
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">lib/reflection/config.rb</dd>
  
</dl>
<div class="clear"></div>



  <h2>Attribute Summary</h2>
  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature"><a title="#command (instance method)" href="#command-instance_method">- (Object) <strong>command</strong> </a>
  
  </span>
  
    
    
  
  
  
  

  
    <span class="summary_desc">
Returns the value of attribute <tt>command</tt>.

</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature"><a title="#directory (instance method)" href="#directory-instance_method">- (Object) <strong>directory</strong> </a>
  
  </span>
  
    
    
  
  
  
  

  
    <span class="summary_desc">
Returns the value of attribute <tt>directory</tt>.

</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature"><a title="#rails_environment (instance method)" href="#rails_environment-instance_method">- (Object) <strong>rails_environment</strong> </a>
  
  </span>
  
    
    
  
  
  
  

  
    <span class="summary_desc">
Returns the value of attribute <tt>rails_environment</tt>.

</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature"><a title="#rails_root (instance method)" href="#rails_root-instance_method">- (Object) <strong>rails_root</strong> </a>
  
  </span>
  
    
    
  
  
  
  

  
    <span class="summary_desc">
Returns the value of attribute <tt>rails_root</tt>.

</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature"><a title="#repository (instance method)" href="#repository-instance_method">- (Object) <strong>repository</strong> </a>
  
  </span>
  
    
    
  
  
  
  

  
    <span class="summary_desc">
Returns the value of attribute <tt>repository</tt>.

</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature"><a title="#store_configuration_path (instance method)" href="#store_configuration_path-instance_method">- (Object) <strong>store_configuration_path</strong> </a>
  
  </span>
  
    
    
  
  
  
  

  
    <span class="summary_desc">
Returns the value of attribute <tt>store_configuration_path</tt>.

</span>
  
</li>

    
  </ul>


  <h2>Method Summary</h2>
  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature"><a title="parse (class method)" href="#parse-class_method">+ (Object) <strong>parse</strong>(args = []) </a>
  
  </span>
  
  
  
  

  
    <span class="summary_desc"></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature"><a title="#from_hash (instance method)" href="#from_hash-instance_method">- (Object) <strong>from_hash</strong>(hash) </a>
  
  </span>
  
  
  
  

  
    <span class="summary_desc"></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature"><a title="#parse_command_line_options (instance method)" href="#parse_command_line_options-instance_method">- (Object) <strong>parse_command_line_options</strong>(args) </a>
  
  </span>
  
  
  
  

  
    <span class="summary_desc"></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature"><a title="#read! (instance method)" href="#read%21-instance_method">- (Object) <strong>read!</strong>(path) </a>
  
  </span>
  
  
  
  

  
    <span class="summary_desc"></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature"><a title="#to_hash (instance method)" href="#to_hash-instance_method">- (Object) <strong>to_hash</strong> </a>
  
  </span>
  
  
  
  

  
    <span class="summary_desc"></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature"><a title="#write (instance method)" href="#write-instance_method">- (Object) <strong>write</strong>(path) </a>
  
  </span>
  
  
  
  

  
    <span class="summary_desc"></span>
  
</li>

    
  </ul>


  <div id="attr_details">
    <h2>Attribute Details</h2>
    
      
      <span id="command=-instance_method"></span>
      <span id="command-instance_method"></span>
      <div class="method_details first">
  <p class="signature first" id="command-instance_method">
  
    - (<tt>Object</tt>) <strong>command</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Returns the value of attribute <tt>command</tt>
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


11
12
13</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/reflection/config.rb', line 11</span>

<span class='def def kw'>def</span> <span class='command identifier id'>command</span>
  <span class='@command ivar id'>@command</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="directory=-instance_method"></span>
      <span id="directory-instance_method"></span>
      <div class="method_details ">
  <p class="signature " id="directory-instance_method">
  
    - (<tt>Object</tt>) <strong>directory</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Returns the value of attribute <tt>directory</tt>
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


12
13
14</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/reflection/config.rb', line 12</span>

<span class='def def kw'>def</span> <span class='directory identifier id'>directory</span>
  <span class='@directory ivar id'>@directory</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="rails_environment=-instance_method"></span>
      <span id="rails_environment-instance_method"></span>
      <div class="method_details ">
  <p class="signature " id="rails_environment-instance_method">
  
    - (<tt>Object</tt>) <strong>rails_environment</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Returns the value of attribute <tt>rails_environment</tt>
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


15
16
17</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/reflection/config.rb', line 15</span>

<span class='def def kw'>def</span> <span class='rails_environment identifier id'>rails_environment</span>
  <span class='@rails_environment ivar id'>@rails_environment</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="rails_root=-instance_method"></span>
      <span id="rails_root-instance_method"></span>
      <div class="method_details ">
  <p class="signature " id="rails_root-instance_method">
  
    - (<tt>Object</tt>) <strong>rails_root</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Returns the value of attribute <tt>rails_root</tt>
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


14
15
16</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/reflection/config.rb', line 14</span>

<span class='def def kw'>def</span> <span class='rails_root identifier id'>rails_root</span>
  <span class='@rails_root ivar id'>@rails_root</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="repository=-instance_method"></span>
      <span id="repository-instance_method"></span>
      <div class="method_details ">
  <p class="signature " id="repository-instance_method">
  
    - (<tt>Object</tt>) <strong>repository</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Returns the value of attribute <tt>repository</tt>
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


13
14
15</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/reflection/config.rb', line 13</span>

<span class='def def kw'>def</span> <span class='repository identifier id'>repository</span>
  <span class='@repository ivar id'>@repository</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="store_configuration_path=-instance_method"></span>
      <span id="store_configuration_path-instance_method"></span>
      <div class="method_details ">
  <p class="signature " id="store_configuration_path-instance_method">
  
    - (<tt>Object</tt>) <strong>store_configuration_path</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Returns the value of attribute <tt>store_configuration_path</tt>
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


16
17
18</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/reflection/config.rb', line 16</span>

<span class='def def kw'>def</span> <span class='store_configuration_path identifier id'>store_configuration_path</span>
  <span class='@store_configuration_path ivar id'>@store_configuration_path</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>


  <div id="method_details">
    <h2>Method Details</h2>
    
      <div class="method_details first">
  <p class="signature first" id="parse-class_method">
  
    + (<tt>Object</tt>) <strong>parse</strong>(args = []) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


18
19
20
21
22
23
24
25
26
27
28
29
30</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/reflection/config.rb', line 18</span>

<span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='parse identifier id'>parse</span><span class='lparen token'>(</span><span class='args identifier id'>args</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span><span class='rparen token'>)</span>
  <span class='config identifier id'>config</span> <span class='assign token'>=</span> <span class='Config constant id'>Config</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
  <span class='case case kw'>case</span>
    <span class='when when kw'>when</span> <span class='notop op'>!</span><span class='args identifier id'>args</span><span class='dot token'>.</span><span class='empty? fid id'>empty?</span> <span class='andop op'>&amp;&amp;</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='exists? fid id'>exists?</span><span class='lparen token'>(</span><span class='args identifier id'>args</span><span class='dot token'>.</span><span class='first identifier id'>first</span><span class='rparen token'>)</span>
      <span class='config identifier id'>config</span><span class='dot token'>.</span><span class='read! fid id'>read!</span><span class='lparen token'>(</span><span class='args identifier id'>args</span><span class='dot token'>.</span><span class='first identifier id'>first</span><span class='rparen token'>)</span>
    <span class='when when kw'>when</span> <span class='notop op'>!</span><span class='args identifier id'>args</span><span class='dot token'>.</span><span class='empty? fid id'>empty?</span>
      <span class='config identifier id'>config</span><span class='dot token'>.</span><span class='parse_command_line_options identifier id'>parse_command_line_options</span><span class='lparen token'>(</span><span class='args identifier id'>args</span><span class='rparen token'>)</span>
      <span class='config identifier id'>config</span><span class='dot token'>.</span><span class='write identifier id'>write</span><span class='lparen token'>(</span><span class='config identifier id'>config</span><span class='dot token'>.</span><span class='store_configuration_path identifier id'>store_configuration_path</span><span class='rparen token'>)</span> <span class='if if_mod kw'>if</span> <span class='config identifier id'>config</span><span class='dot token'>.</span><span class='store_configuration_path identifier id'>store_configuration_path</span>
    <span class='else else kw'>else</span>
      <span class='config identifier id'>config</span><span class='dot token'>.</span><span class='read! fid id'>read!</span><span class='lparen token'>(</span><span class='File constant id'>File</span><span class='dot token'>.</span><span class='join identifier id'>join</span><span class='lparen token'>(</span><span class='Dir constant id'>Dir</span><span class='dot token'>.</span><span class='pwd identifier id'>pwd</span><span class='comma token'>,</span> <span class='string val'>'reflection.yml'</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
  <span class='end end kw'>end</span>
  <span class='config identifier id'>config</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="from_hash-instance_method">
  
    - (<tt>Object</tt>) <strong>from_hash</strong>(hash) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


42
43
44
45
46
47
48</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/reflection/config.rb', line 42</span>

<span class='def def kw'>def</span> <span class='from_hash identifier id'>from_hash</span><span class='lparen token'>(</span><span class='hash identifier id'>hash</span><span class='rparen token'>)</span>
  <span class='self self kw'>self</span><span class='dot token'>.</span><span class='command identifier id'>command</span> <span class='assign token'>=</span> <span class='hash identifier id'>hash</span><span class='lbrack token'>[</span><span class='symbol val'>:command</span><span class='rbrack token'>]</span>
  <span class='self self kw'>self</span><span class='dot token'>.</span><span class='directory identifier id'>directory</span> <span class='assign token'>=</span> <span class='hash identifier id'>hash</span><span class='lbrack token'>[</span><span class='symbol val'>:directory</span><span class='rbrack token'>]</span>
  <span class='self self kw'>self</span><span class='dot token'>.</span><span class='repository identifier id'>repository</span> <span class='assign token'>=</span> <span class='hash identifier id'>hash</span><span class='lbrack token'>[</span><span class='symbol val'>:repository</span><span class='rbrack token'>]</span>
  <span class='self self kw'>self</span><span class='dot token'>.</span><span class='rails_root identifier id'>rails_root</span> <span class='assign token'>=</span> <span class='hash identifier id'>hash</span><span class='lbrack token'>[</span><span class='symbol val'>:rails_root</span><span class='rbrack token'>]</span>
  <span class='self self kw'>self</span><span class='dot token'>.</span><span class='rails_environment identifier id'>rails_environment</span> <span class='assign token'>=</span> <span class='hash identifier id'>hash</span><span class='lbrack token'>[</span><span class='symbol val'>:rails_environment</span><span class='rbrack token'>]</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="parse_command_line_options-instance_method">
  
    - (<tt>Object</tt>) <strong>parse_command_line_options</strong>(args) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/reflection/config.rb', line 72</span>

<span class='def def kw'>def</span> <span class='parse_command_line_options identifier id'>parse_command_line_options</span><span class='lparen token'>(</span><span class='args identifier id'>args</span><span class='rparen token'>)</span>
  <span class='opt_parser identifier id'>opt_parser</span> <span class='assign token'>=</span> <span class='OptionParser constant id'>OptionParser</span><span class='dot token'>.</span><span class='new identifier id'>new</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='opts identifier id'>opts</span><span class='bitor op'>|</span>
    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='banner identifier id'>banner</span> <span class='assign token'>=</span>   <span class='string val'>&quot;Usage: reflection --COMMAND --repository=GIT_REPO --directory=PATH\n&quot;</span>
    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='banner identifier id'>banner</span> <span class='lshft op'>&lt;&lt;</span>  <span class='string val'>&quot; -or-\n&quot;</span>
    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='banner identifier id'>banner</span> <span class='lshft op'>&lt;&lt;</span>  <span class='string val'>&quot;Usage: reflection /path/to/reflection-config-file.yml&quot;</span>
    
    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='separator identifier id'>separator</span> <span class='string val'>&quot; &quot;</span>
    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='separator identifier id'>separator</span> <span class='string val'>&quot;On the server side:&quot;</span>

    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>&quot;-s&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;--stash&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Store your assets and/or a database dump in a git-repository.&quot;</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='stash identifier id'>stash</span><span class='bitor op'>|</span>
      <span class='self self kw'>self</span><span class='dot token'>.</span><span class='command identifier id'>command</span> <span class='assign token'>=</span> <span class='symbol val'>:stash</span>
    <span class='end end kw'>end</span>

    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='separator identifier id'>separator</span> <span class='string val'>&quot;On the client side:&quot;</span>
    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>&quot;-a&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;--apply&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Apply assets and/or a database dump loaded from a git-repository.&quot;</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='apply identifier id'>apply</span><span class='bitor op'>|</span>
      <span class='self self kw'>self</span><span class='dot token'>.</span><span class='command identifier id'>command</span> <span class='assign token'>=</span> <span class='symbol val'>:apply</span>
    <span class='end end kw'>end</span>

    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='separator identifier id'>separator</span> <span class='string val'>&quot; &quot;</span>
    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='separator identifier id'>separator</span> <span class='string val'>&quot;Required options for both:&quot;</span>
    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>&quot;-r&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;--repository GIT_URL&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;A Git repository(url) to be used as storage&quot;</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='repository identifier id'>repository</span><span class='bitor op'>|</span>
      <span class='self self kw'>self</span><span class='dot token'>.</span><span class='repository identifier id'>repository</span> <span class='assign token'>=</span> <span class='repository identifier id'>repository</span>
    <span class='end end kw'>end</span>

    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>&quot;-d&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;--directory PATH&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Path to your asset directory&quot;</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='directory identifier id'>directory</span><span class='bitor op'>|</span>
      <span class='self self kw'>self</span><span class='dot token'>.</span><span class='directory identifier id'>directory</span> <span class='assign token'>=</span> <span class='directory identifier id'>directory</span>
    <span class='end end kw'>end</span>

    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='separator identifier id'>separator</span> <span class='string val'>&quot; &quot;</span>
    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='separator identifier id'>separator</span> <span class='string val'>&quot;Additional options for both:&quot;</span>

    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>&quot;--rails [RAILS_ROOT]&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Enable dumping/applying of a Rails managed MySQL database&quot;</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='path identifier id'>path</span><span class='bitor op'>|</span>
      <span class='self self kw'>self</span><span class='dot token'>.</span><span class='rails_root identifier id'>rails_root</span> <span class='assign token'>=</span> <span class='path identifier id'>path</span> <span class='orop op'>||</span> <span class='nil nil kw'>nil</span>
    <span class='end end kw'>end</span>        

    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>&quot;--rails-env [ENV]&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Rails environment to instrument&quot;</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='environment identifier id'>environment</span><span class='bitor op'>|</span>
      <span class='self self kw'>self</span><span class='dot token'>.</span><span class='rails_environment identifier id'>rails_environment</span> <span class='assign token'>=</span> <span class='environment identifier id'>environment</span> <span class='orop op'>||</span> <span class='nil nil kw'>nil</span>
    <span class='end end kw'>end</span>        
    
    <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>&quot;--write [FILE]&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Create a configuration FILE from the current commandline options&quot;</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='config_file_path identifier id'>config_file_path</span><span class='bitor op'>|</span>
      <span class='self self kw'>self</span><span class='dot token'>.</span><span class='store_configuration_path identifier id'>store_configuration_path</span> <span class='assign token'>=</span> <span class='config_file_path identifier id'>config_file_path</span> <span class='if if_mod kw'>if</span> <span class='config_file_path identifier id'>config_file_path</span>
    <span class='end end kw'>end</span>
  <span class='end end kw'>end</span>

  <span class='opt_parser identifier id'>opt_parser</span><span class='dot token'>.</span><span class='parse! fid id'>parse!</span><span class='lparen token'>(</span><span class='args identifier id'>args</span><span class='rparen token'>)</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="read!-instance_method">
  
    - (<tt>Object</tt>) <strong>read!</strong>(path) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


60
61
62
63
64
65
66
67
68
69
70</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/reflection/config.rb', line 60</span>

<span class='def def kw'>def</span> <span class='read! fid id'>read!</span><span class='lparen token'>(</span><span class='path identifier id'>path</span><span class='rparen token'>)</span>
  <span class='begin begin kw'>begin</span>
    <span class='if if kw'>if</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='exist? fid id'>exist?</span><span class='lparen token'>(</span><span class='path identifier id'>path</span><span class='rparen token'>)</span>
      <span class='options identifier id'>options</span> <span class='assign token'>=</span> <span class='YAML constant id'>YAML</span><span class='dot token'>.</span><span class='load_file identifier id'>load_file</span><span class='lparen token'>(</span><span class='path identifier id'>path</span><span class='rparen token'>)</span>
      <span class='raise identifier id'>raise</span><span class='lparen token'>(</span><span class='Reflection constant id'>Reflection</span><span class='colon2 op'>::</span><span class='ConfigArgumentError constant id'>ConfigArgumentError</span><span class='comma token'>,</span> <span class='string val'>&quot;Config file is invalid.&quot;</span><span class='rparen token'>)</span> <span class='unless unless_mod kw'>unless</span> <span class='options identifier id'>options</span><span class='dot token'>.</span><span class='is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='Hash constant id'>Hash</span><span class='rparen token'>)</span>
      <span class='self self kw'>self</span><span class='dot token'>.</span><span class='from_hash identifier id'>from_hash</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='rparen token'>)</span>
    <span class='end end kw'>end</span>
  <span class='rescue rescue kw'>rescue</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='e identifier id'>e</span>
    <span class='Reflection constant id'>Reflection</span><span class='colon2 op'>::</span><span class='Support constant id'>Support</span><span class='dot token'>.</span><span class='exit_with_error identifier id'>exit_with_error</span><span class='lparen token'>(</span><span class='dstring node'>&quot;Parsing of config file '#{path}' failed: #{e.message}&quot;</span><span class='rparen token'>)</span>
  <span class='end end kw'>end</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="to_hash-instance_method">
  
    - (<tt>Object</tt>) <strong>to_hash</strong> 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


32
33
34
35
36
37
38
39
40</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/reflection/config.rb', line 32</span>

<span class='def def kw'>def</span> <span class='to_hash identifier id'>to_hash</span>
  <span class='lbrace token'>{</span> 
    <span class='symbol val'>:command</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='command identifier id'>command</span><span class='comma token'>,</span> 
    <span class='symbol val'>:repository</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='repository identifier id'>repository</span><span class='comma token'>,</span> 
    <span class='symbol val'>:directory</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='directory identifier id'>directory</span><span class='comma token'>,</span>
    <span class='symbol val'>:rails_root</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='rails_root identifier id'>rails_root</span><span class='comma token'>,</span>
    <span class='symbol val'>:rails_environment</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='rails_environment identifier id'>rails_environment</span>
  <span class='rbrace token'>}</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="write-instance_method">
  
    - (<tt>Object</tt>) <strong>write</strong>(path) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


50
51
52
53
54
55
56
57
58</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/reflection/config.rb', line 50</span>

<span class='def def kw'>def</span> <span class='write identifier id'>write</span><span class='lparen token'>(</span><span class='path identifier id'>path</span><span class='rparen token'>)</span>
  <span class='begin begin kw'>begin</span>
    <span class='io identifier id'>io</span> <span class='assign token'>=</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='open identifier id'>open</span><span class='lparen token'>(</span><span class='path identifier id'>path</span><span class='comma token'>,</span> <span class='string val'>'w'</span><span class='rparen token'>)</span>
    <span class='YAML constant id'>YAML</span><span class='dot token'>.</span><span class='dump identifier id'>dump</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='to_hash identifier id'>to_hash</span><span class='comma token'>,</span> <span class='io identifier id'>io</span><span class='rparen token'>)</span>
    <span class='io identifier id'>io</span><span class='dot token'>.</span><span class='close identifier id'>close</span>
  <span class='rescue rescue kw'>rescue</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='e identifier id'>e</span>
    <span class='Reflection constant id'>Reflection</span><span class='colon2 op'>::</span><span class='Support constant id'>Support</span><span class='dot token'>.</span><span class='exit_with_error identifier id'>exit_with_error</span><span class='lparen token'>(</span><span class='dstring node'>&quot;Writing of config file to '#{path}' failed: #{e.message}&quot;</span><span class='rparen token'>)</span>
  <span class='end end kw'>end</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>
    
    <div id="footer">
  Generated on Wed Nov 18 18:17:11 2009 by 
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
  0.4.0 (ruby-1.8.7).
</div>

  </body>
</html>